package com.icloud.common.database.enums;

import lombok.Getter;

@Getter
public enum AttachmentTypeEnum {
    VIDEO("VIDEO"), // 视频
    IMG("IMG"); // 图片

    private final String code;

    AttachmentTypeEnum(String code){
        this.code = code;
    }

    public static AttachmentTypeEnum byCode(String code) {
        for (AttachmentTypeEnum e: AttachmentTypeEnum.values()) {
            if (e.code.equalsIgnoreCase(code)) {
                return e;
            }
        }
        return null;
    }
}
